/* parse.h */

#ifndef PARSE_H_FILE
#define PARSE_H_FILE

#define PARSE_TOKEN_LEN 256

typedef struct {
  char filename[256];
  FILE *f;
  char token[PARSE_TOKEN_LEN];
  char saved_token[PARSE_TOKEN_LEN];
} PARSE_STATE;

int parse_open(PARSE_STATE *state, const char *filename);
char *parse_get_token(PARSE_STATE *state);
void parse_unget_token(PARSE_STATE *state);
void parse_close(PARSE_STATE *state);

#endif /* PARSE_H_FILE */
